package top.jacktgq.itheima.nio.selector.multiThread.v2;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @Author CandyWall
 * @Date 2021/3/19--17:31
 * @Description
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost", 8080));
        sc.write(Charset.defaultCharset().encode("1234567890abcdefg"));
        System.in.read();
    }
}
